package day10;

public class learn7 {
    public static  void main(String[] args) {
        System.out.println("***诗歌的格式******");
        //定义一个字符串来接受这个诗歌
        String th ="长亭外 古道边 芳草碧连天 晚风柳笛声残 夕阳山外山";
        System.out.println("原诗歌的格式:"+th);
        System.out.println("拆分的诗歌格式");
        String num= th.substring(0,3);
        System.out.println(num.toString());
         String num1=th.substring(4,7);
         System.out.println(num1.toString());
         String num2=th.substring(8,13);
         System.out.println(num2.toString());
         String num3=th.substring(14,20);
         System.out.println(num3.toString());
          String num4=th.substring(21,26);
          System.out.println(num4.toString());

    }
}
